#include <stdio.h>
#include <string.h>

void reverse(char s[]);
int i,j;

int main()
{
    char s[] = "123456789";
    i = 0;
    j = strlen(s) - 1;

    reverse(s);

    printf("s  =%s\n", s);
    return 0;
}

void reverse(char s[])
{
    int c;
    if (i < j)
    {
        c = s[i];
        s[i] = s[j];
        s[j] = c;
        i++;
        j--;
        reverse(s);
    }
    
}